home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
develop, the CD; issue 1
/
Apple_Develop_1989.bin
/
Declaration ROM
/
ExROM1Fun.a
next >
Wrap
Text File
|
1989-09-15
|
11KB
|
282 lines
;---------------------------------------------------------------------------------------
;
;File: ExROM1Fun.a
;Dev system: MPW 3.0
;By: MacDTS
;Date: 8/08/89
;
; This is a very small sample declaration ROM with the required board
; sResource and a functional sResource (which is blank).
; The board id and functional sResource types are especially bogus - your values
; must be obtained from MacDTS, after sending in the required information.
; Anyway, this file shows how to put together a ROM. You also need
; the Cards and Drivers book, with the source code for a ROM and driver.
; Both are stripped down versions of the Apple Macintosh Video card ROM and
; video driver aka the TFB board. There are also other examples and exploded
; drawings of declaration ROMs on the Developer Helper CD. Volume one is
; known as "Phil and Dave's Excellent CD". The examples, tools, and drawings are
; also on AppleLink. To get to them, go into (in order):
;
; Developer Services bulletin board icon
; Developer Technical Support folder
; Macintosh folder
; Tools folder
; Card Dev tools folder
;
;
; In the Card Dev Tools folder are other folders containing tools and
; libraries. These include:
;
; Examples folder - contains example declaration ROMs, video driver,
; source to a program like the GetsInfo program found
; in the Slot Tools folder
; Gamma Information folder - contains documention discussing gamma table format.
; This will be updated in later documentation for the
; new 32-bit QuickDraw. Eventually, the Cards and
; Drivers book will contain the new gamma information,
; NuBusTester folder - contains a library to detect new ROMs with fixed
; Slot Manager (Slot Manager that runs in 32-bit mode
; as opposed to 24-bit mode)
; Training Tools folder - contains MacDraw drawings of exploded
; configuration ROMs (like the existing Apple video
; card ROM and the Apple EtherNet board ROM.
;
; Slot tools folder - Inside, you'll find these tools:
;
; CRCPatch - MPW tool that calculates and patches in
; the crc value of the assembled Declaration ROM file.
;
; Data - MPW tool takes the assembled file and strips
; off the code 0 segment,leaving the code 1 segment
; (the raw code). The resulting file can then be
; downloaded to a rom burning machine.
;
; Tjscomm - A small terminal program that can be used
; to download the data file to a rom burning machine.
;
; SlotMgrTst - application that excersises the slot
; manager by making slot manager calls
;
; GetsInfo - application that displays sResources and
; other configuration ROM information
;
; Disclaimer: the above may be reorganized at any time, or changed via additions
; and deletions.
;
;
; The general structure of this example ROM is:
;
; [Format/Header]
; |
; |
; [sResource Directory]
; / \
; / \
; / \
; / \
; [Board sResource] [Functional sResource]
; - Primary Init. - Driver Directory.
; - board id
; - Vendor Info.
;
;
; If you want to print this, I suggest using landscape mode!!!
;
;-------------------------------------------------------------------
MACHINE MC68020
;=====================================================================
; Initial Assembler Directives
;=====================================================================
PRINT OFF
STRING C
;Note - File names changed
;since example in C & D
;book was published.
INCLUDE 'SysErr.a' ;Macintosh error equates
INCLUDE 'SysEqu.a' ;Macintosh System equates
INCLUDE 'ROMEqu.a' ;Declaration ROM equates
INCLUDE 'SlotEqu.a' ;Slot Manager equates and macros
INCLUDE 'TimeEqu.a' ;Macintosh traps
INCLUDE 'Traps.a' ;Macintosh traps
PRINT ON
;
;=====================================================================
; BEGIN Declaration ROM
;=====================================================================
SampleDeclROM MAIN
;*************************************************************
; Constants
;*************************************************************
ROMSize EQU $1000 ;4K byte ROM in this example
TheBoardId EQU $ABCD ;the Board Id (DON'T USE
; THIS-GET from DTS!)
;board sResource equates
;the following two lines are
;catBoard EQU 1 ;commented out since the equates
;TypeBoard EQU 0 ;are already defined in ROMEqu.a
DrSwBoard EQU 0 ;NOT in ROMEqu.a, define it here
DrHwBoard EQU 0 ;NOT in ROMEqu.a, define it here
CatExCat EQU $6666 ;Functional sResource sRsrc_Type
TypExTyp EQU $7777 ;equates. THESE ARE EXAMPLES
DrSwExSw EQU $8888 ;ONLY! DON'T USE THESE VALUES
DrHwExHw EQU $9999 ;GET THEM FROM DTS!!
;Example values-vendors
;should modify as needed
defMinorBase EQU 0 ;RAM Offset is 0
defMinorLength EQU $40000 ;RAM length is $40000
;----------- sResource Directory ;<Id OF>
sRsrcBoard EQU 1 ;Board sResource {May be any
;number in [0..127]}
sRsrcFun EQU 128 ;functional sResource {May be
;any number in [128..254]}
;=====================================================================
; Directory
;=====================================================================
_sRsrcDir OSLstEntry sRsrcBoard,_sRsrcBoard ;References board sResource.
OSLstEntry sRsrcFun,_sRsrcFun ;References functional sResource.
DatLstEntry endOfList,0 ;End of the list.
;=============================================================
; The Board sResource
;=============================================================
_sRsrcBoard OSLstEntry sRsrcType,_BoardType ;References Rsrc_Type entry
OSLstEntry sRsrcName,_BoardName ;References Rsrc_Name entry
DatLstEntry boardId,TheBoardId ;boardId **ASSIGNED BY MACDTS**
OSLstEntry primaryInit,_sPInitRec ;References Primary init record.
OSLstEntry vendorInfo,_VendorInfo ;References Vendor info list.
DatLstEntry endOfList,0 ;End of the list.
;Rsrc_Type IS ALWAYS THE SAME
;for the board sResource
;(but varies with different
;functional sResources)
_BoardType DC.W CatBoard ;ALWAYS $0001 for bd sResource
DC.W TypBoard ;ALWAYS $0000 for bd sResource
DC.W DrSwBoard ;ALWAYS $0000 for bd sResource
DC.W DrHwBoard ;ALWAYS $0000 for bd sResource
_BoardName DC.L 'OFFICIAL PRODUCT NAME' ;The name of the Board - should
;be official product name
;-------------------------------------------------------------
; Primary Init Record (if needed)
;-------------------------------------------------------------
_sPInitRec DC.L _EndsPInitRec-_sPInitRec ;physical Block Size
; INCLUDE 'PrimaryInit.a' ;Primary Init Code
_EndsPInitRec EQU * ;End of block
STRING C ;Restore to 'c' string type.
;-------------------------------------------------------------
; Vendor Information record
;-------------------------------------------------------------
;** THE VENDOR INFO ENTRIES
;ARE DEFINED BY THE VENDOR, NOT
;BY MACDTS **
_VendorInfo OSLstEntry VendorId,_VendorId ;References the Vendor Id.
OSLstEntry RevLevel,_RevLevel ;References the Revision Level.
OSLstEntry PartNum,_PartNum ;References the Part Number.
DatLstEntry endOfList,0 ;End of the list.
_VendorId DC.L 'COMPANY NAME' ;The Vendor Id. Most vendors use
;company name
_RevLevel DC.L 'Release-1.0' ;The Revision Level
_PartNum DC.L '12-3456' ;The Part Number
;=============================================================
; The Functional sResource
;=============================================================
_sRsrcFun OSLstEn